<!DOCTYPE html>
<meta charset="UTF-8">
<table data-type="grid" title="简单工具栏" style="width: 700px; height: 250px"
	data-defs="rownumbers:true,singleSelect:true,
		toolbar:toolbar,headerCls:'byb',
		method:'get',url: 'demo/testdata/grid_data1.json',
		fit:true,
		fitColumns:true">
	<thead>
		<tr>
			<th data-defs="field:'itemid',width:80,checkbox:false">ID</th>
			<th data-defs="field:'productid',width:200">产品名称</th>
			<th data-defs="field:'listprice',width:80,align:'right'">成本</th>
			<th data-defs="field:'unitcost',width:80,align:'right'">单价</th>
			<th data-defs="field:'attr1',width:100">属性</th>
			<th data-defs="field:'status',width:60,align:'center'">状态</th>
		</tr>
	</thead>
</table>
<script type="text/javascript">
	var toolbar = [ {
        text : '新增',
        iconCls : 'icon-add',
        handler : function() {
	        alert('add')
        }
    }, {
        text : '剪切',
        iconCls : 'icon-cut',
        handler : function() {
	        alert('cut')
        }
    }, '-', {
        text : '保存',
        iconCls : 'icon-save',
        handler : function() {
	        alert('save')
        }
    } ];
</script>
